/*----------------------------------------------------------
* FILE: TbFtpFenixSrc.java
* LOGICAL NAME: TbFtpFenixSrc
* PRODUCT: jsiit-model
*----------------------------------------------------------
* IMPORTANT NOTICE
* This program is property of DAI ( Development Alternatives Inc )
* Its unauthorized use, as any code alteration without authorization 
* is prohibited
*----------------------------------------------------------
* MODIFICATIONS
* DATE 30/11/2009
* AUTHOR nalopez
*----------------------------------------------------------
*/

package sv.gob.mh.dgii.model;

import java.io.Serializable;
import java.util.Set;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.Id;
import javax.persistence.OneToMany;
import javax.persistence.Table;

/**
 * @author TPAR
 * <b>Created by </b>nalopez
 * <b>for</b>jsiit-model
 * <b>on</b> 30/11/2009 13:41:26
 * <b>Purpose</b> 
 * <p>
 * </p>
 */
@Entity
@Table(name = "TB_FTP_FENIX_SRC", schema = "CATALOGOS")
public class TbFtpFenixSrc implements Serializable {

	/**
	 * 
	 */
	private static final long serialVersionUID = -3851308865678712636L;

	private String cfenixSrc;
	private String sftpHost;
	private String sftpUser;
	private String sftpPass;
	private String sftpInitdir;
	private String sftpSyskey;
	private Integer bactivo;
	private String sdescripcion;
	private Set<EdCtrlArchivosFenix> edCtrlArchivosFenixs; 
	
	/**
	 * 
	 */
	public TbFtpFenixSrc() {
	}
	
	public TbFtpFenixSrc(String cfenixSrc) {
		this.cfenixSrc = cfenixSrc;
	}
	
	public TbFtpFenixSrc(String cfenixSrc, String sftpHost, String sftpUser,
			String sftpPass, String sftpInitdir, String sftpSyskey,
			Integer bactivo, String sdescripcion) {
		this.cfenixSrc = cfenixSrc;
		this.sftpHost = sftpHost;
		this.sftpUser = sftpUser;
		this.sftpPass = sftpPass;
		this.sftpInitdir = sftpInitdir;
		this.sftpSyskey = sftpSyskey;
		this.bactivo = bactivo;
		this.sdescripcion = sdescripcion;
	}

	@Id
	@Column(name = "C_FENIX_SRC", unique = true, nullable = false, length = 5)
	public String getCfenixSrc() {
		return cfenixSrc;
	}

	public void setCfenixSrc(String cfenixSrc) {
		this.cfenixSrc = cfenixSrc;
	}

	@Column(name = "S_FTP_HOST", nullable = true, length = 30)
	public String getSftpHost() {
		return sftpHost;
	}

	public void setSftpHost(String sftpHost) {
		this.sftpHost = sftpHost;
	}

	@Column(name = "S_FTP_USER", nullable = true, length = 30)
	public String getSftpUser() {
		return sftpUser;
	}

	public void setSftpUser(String sftpUser) {
		this.sftpUser = sftpUser;
	}

	@Column(name = "S_FTP_PASS", nullable = true, length = 30)
	public String getSftpPass() {
		return sftpPass;
	}

	public void setSftpPass(String sftpPass) {
		this.sftpPass = sftpPass;
	}

	@Column(name = "S_FTP_INITDIR", nullable = true, length = 100)
	public String getSftpInitdir() {
		return sftpInitdir;
	}

	public void setSftpInitdir(String sftpInitdir) {
		this.sftpInitdir = sftpInitdir;
	}

	@Column(name = "S_FTP_SYSKEY", nullable = true, length = 25)
	public String getSftpSyskey() {
		return sftpSyskey;
	}

	public void setSftpSyskey(String sftpSyskey) {
		this.sftpSyskey = sftpSyskey;
	}

	@Column(name = "B_ACTIVO", nullable = true, precision = 1, scale = 0)
	public Integer getBactivo() {
		return bactivo;
	}

	public void setBactivo(Integer bactivo) {
		this.bactivo = bactivo;
	}

	@Column(name = "S_DESCRIPCION", nullable = true, length = 100)
	public String getSdescripcion() {
		return sdescripcion;
	}

	public void setSdescripcion(String sdescripcion) {
		this.sdescripcion = sdescripcion;
	}

	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "tbFtpFenixSrc")
	public Set<EdCtrlArchivosFenix> getEdCtrlArchivosFenixs() {
		return edCtrlArchivosFenixs;
	}

	public void setEdCtrlArchivosFenixs(
			Set<EdCtrlArchivosFenix> edCtrlArchivosFenixs) {
		this.edCtrlArchivosFenixs = edCtrlArchivosFenixs;
	}	

}
